<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<title>智联招聘</title>

<link rel="stylesheet" type="text/css" href="__PUBLIC__/Css/scrollbar.css">
<script type="application/javascript" src="__PUBLIC__/Js/iscroll.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/jquery-1.4.2.min.js"></script>
<style type="text/css" media="all">
body,ul,li {
	padding:0;
	margin:0;
	border:0;
}
body {
	font-size:12px;
	-webkit-user-select:none;
    -webkit-text-size-adjust:none;
	font-family:helvetica;
}
#header {
	position:absolute;
	top:0; left:0;
	width:100%;
	height:45px;
	line-height:45px;
	background-image:-webkit-gradient(linear, 0 0, 0 100%, color-stop(0, #fe96c9), color-stop(0.05, #d51875), color-stop(1, #7b0a2e));
	background-image:-moz-linear-gradient(top, #fe96c9, #d51875 5%, #7b0a2e);
	background-image:-o-linear-gradient(top, #fe96c9, #d51875 5%, #7b0a2e);
	padding:0;
	color:#eee;
	font-size:20px;
	text-align:center;
}
#header a {
	color:#f3f3f3;
	text-decoration:none;
	font-weight:bold;
	text-shadow:0 -1px 0 rgba(0,0,0,0.5);
}
#footer {
	position:absolute;
	bottom:0; left:0;
	width:100%;
	height:48px;
	background-image:-webkit-gradient(linear, 0 0, 0 100%, color-stop(0, #999), color-stop(0.02, #666), color-stop(1, #222));
	background-image:-moz-linear-gradient(top, #999, #666 2%, #222);
	background-image:-o-linear-gradient(top, #999, #666 2%, #222);
	padding:0;
	border-top:1px solid #444;
}
#wrapper {
	position:absolute; 
	z-index:1;
	top:45px; 
	bottom:48px; 
	left:0;
	width:100%;
	background:#555;
	overflow:auto;
}
#scroller {
	position:relative;
/*	-webkit-touch-callout:none;*/
	-webkit-tap-highlight-color:rgba(0,0,0,0);
	width:100%;
	padding:0;
}
#scroller ul {
	position:relative;
	list-style-type:none;
	padding:0;
	margin:0;
	width:100%;
}
#scroller li {
	border-bottom:1px solid #ccc;
	border-top:1px solid #fff;
	background-color:#fafafa;
	font-size:14px;
}
/**
 *
 * 下拉样式 Pull down styles
 *
 */
#pullDown, #pullUp {
	background:#fff;
	height:40px;
	line-height:40px;
	padding:5px 10px;
	border-bottom:1px solid #ccc;
	font-weight:bold;
	font-size:14px;
	color:#888;
}
#pullDown .pullDownIcon, #pullUp .pullUpIcon  {
	display:block; float:left;
	width:40px; height:40px;
	background:url(pull-icon@2x.png) 0 0 no-repeat;
	-webkit-background-size:40px 80px; background-size:40px 80px;
	-webkit-transition-property:-webkit-transform;
	-webkit-transition-duration:250ms;	
}
#pullDown .pullDownIcon {
	-webkit-transform:rotate(0deg) translateZ(0);
}
#pullUp .pullUpIcon  {
	-webkit-transform:rotate(-180deg) translateZ(0);
}
#pullDown.flip .pullDownIcon {
	-webkit-transform:rotate(-180deg) translateZ(0);
}
#pullUp.flip .pullUpIcon {
	-webkit-transform:rotate(0deg) translateZ(0);
}

#pullDown.loading .pullDownIcon, #pullUp.loading .pullUpIcon {
	background-position:0 100%;
	-webkit-transform:rotate(0deg) translateZ(0);
	-webkit-transition-duration:0ms;
	-webkit-animation-name:loading;
	-webkit-animation-duration:2s;
	-webkit-animation-iteration-count:infinite;
	-webkit-animation-timing-function:linear;
}
@-webkit-keyframes loading {
	from { -webkit-transform:rotate(0deg) translateZ(0); }
	to { -webkit-transform:rotate(360deg) translateZ(0); }
}
#title_img{
	float:left;
	margin:10px;
	padding:0;
	width:20%;
}
#list_div{
	border:1px solid #c7c7c7;
	background-image:-webkit-gradient(linear,lefttop,leftbottom,from(#ffffff),to(#f0f0f0));
	background-image:-webkit-linear-gradient(#ffffff,#f0f0f0);
	background-image:-moz-linear-gradient(#ffffff,#f0f0f0);
	background-image:-ms-linear-gradient(#ffffff,#f0f0f0);
	background-image:-o-linear-gradient(#ffffff,#f0f0f0);
	background-image:linear-gradient(#ffffff,#f0f0f0)width:100%-24px;
	overflow:hidden;
	text-overflow:ellipsis;
    -moz-box-shadow:0px 3px 2px #c7c7c7;            
    -webkit-box-shadow:0px 3px 2px #c7c7c7;         
    box-shadow:0px 3px 2px #c7c7c7;
}
#list_a{
	text-decoration:none;
	color:#333;
}
#con{
	font-weight:600; 
	color:#333; 
	font-size:16px;
	padding:10px;
}
#list_li{
	border:none !important;
	padding-left:8px; 
	padding-right:8px; 
	padding-top:5px; 
	padding-bottom:5px; 
	background-color:#f5f5f5;
}	
#img_desc{
	float:left;
	margin:20px 10px;
	padding:0;
	width:20%;
}
</style>
</head>
<body>
<div id="header">
<a href="javascript:vodi(0)">{$module}</a>
</div>
<div id="wrapper">
    <div id="scroller">
        <ul id="thelist" data="10">
            <volist name="rs" id="val">
                <li id="list_li">
                    <div data-shadow="true" id="list_div">
                        <a id="list_a" href="http://www.subaoming.cn/zhilian/{$val.news_url}" style="color:#333">
                            <img style="float:left;margin:25px 9px;padding:0;width:20%;" src="__ROOT__/{$val.news_image_s}">
                            <p id="con">{$val.news_title}</p>
                        </a>
                    </div>
                </li>
            </volist>
        </ul>
        <div id="pullUp">
            <span class="pullUpIcon"></span><span class="pullUpLabel">上拉加载更多...</span>
        </div>
    </div>
</div>
<div id="footer"></div>

</body>
</html>
<script type="text/javascript">
//http://www.gafish.net/api/iScroll.html 		iScroll 4.2.5 中文API 		该网站详细介绍了iscroll.js 具体请查阅
var myScroll,
	pullUpEl, 
	pullUpOffset,
	generatedCount = 0;

/**
 * 滚动翻页 （自定义实现此方法）
 * myScroll.refresh();		// 数据加载完成后，调用界面更新方法
 */
function pullUpAction () {
	setTimeout(function () {	// <-- Simulate network congestion, remove setTimeout from production!
		var el;
		el = document.getElementById('thelist');
		var total_count=parseInt('{$count}'),
			currnet_count = parseInt($('#thelist').attr('data'));
		if(currnet_count>=total_count){
			pullUpEl=document.getElementById('pullUp');
			pullUpEl.querySelector('.pullUpLabel').innerHTML = '已经没有了...亲!!!';
			return;
		}
		$.ajax({
			type:'post',
			url:'__URL__/loadmore',
			data:'currnet_count='+currnet_count+'&news_category={$news_category}',
			dataType:'html',
			success:function(data)
			{
				$('#thelist').attr('data',currnet_count+3);
				$('#thelist').append(data);
				myScroll.refresh();	//加载完成后调用该方法重新刷新页面			
			}	
		});	
		//myScroll.refresh();		// 数据加载完成后，调用界面更新方法 Remember to refresh when contents are loaded (ie: on ajax completion)
	}, 1000);	// <-- Simulate network congestion, remove setTimeout from production!
}
/*function pullUpAction () {
	setTimeout(function () {	// <-- Simulate network congestion, remove setTimeout from production!
		var total_count=parseInt('{$count}'),
			currnet_count = parseInt($('#thelist').attr('data'));
		if(currnet_count>total_count){
			pullUpEl=document.getElementById('pullUp');
			pullUpEl.querySelector('.pullUpLabel').innerHTML = '已经没有了...亲!!!';
			return;
		}
		$.ajax({
			type:'post',
			url:'__URL__/loadmore',
			data:'currnet_count='+currnet_count+'&tab={$tab}',
			dataType:'html',
			success:function(data)
			{
				$('#thelist').attr('data',currnet_count+3);
				$('#thelist').append(data);				
			}	
		});	
		myScroll.refresh();		// 数据加载完成后，调用界面更新方法 Remember to refresh when contents are loaded (ie: on ajax completion)
	}, 1000);	// <-- Simulate network congestion, remove setTimeout from production!
}*/
/**
 * 初始化iScroll控件
 */
function loaded() {
	pullUpEl = document.getElementById('pullUp');	
	pullUpOffset = pullUpEl.offsetHeight;
	
	myScroll = new iScroll('wrapper', {
		scrollbarClass: 'myScrollbar', /* 重要样式 */
		useTransition: false, /* 此属性不知用意，本人从true改为false */
		onRefresh: function () {
			if (pullUpEl.className.match('loading')) {
				pullUpEl.className = '';
				pullUpEl.querySelector('.pullUpLabel').innerHTML = '上拉加载更多...';
			}
		},
		onScrollMove: function () {
			if (this.y < (this.maxScrollY - 5) && !pullUpEl.className.match('flip')) {
				pullUpEl.className = 'flip';
				pullUpEl.querySelector('.pullUpLabel').innerHTML = '松手开始更新...';
				this.maxScrollY = this.maxScrollY;
			} else if (this.y > (this.maxScrollY + 5) && pullUpEl.className.match('flip')) {
				pullUpEl.className = '';
				pullUpEl.querySelector('.pullUpLabel').innerHTML = '上拉加载更多...';
				this.maxScrollY = pullUpOffset;
			}
		},
		onScrollEnd: function () {
			if (pullUpEl.className.match('flip')) {
				pullUpEl.className = 'loading';
				pullUpEl.querySelector('.pullUpLabel').innerHTML = '加载中...';				
				pullUpAction();	// Execute custom function (ajax call?)
			}
		}
	});
	
	setTimeout(function () { document.getElementById('wrapper').style.left = '0'; }, 800);
}

//初始化绑定iScroll控件 
document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false);
document.addEventListener('DOMContentLoaded', loaded, false); 

</script>